namespace cpp mp2
struct Node {
	1: i32 m;
	2: i32 id;
	3: i32 port;
	4: i32 introPort;
	5: i32 hash;
}

service NodeService {
	Node findSuccessor(1: i32 hash);
	Node findPredecessor(1: i32 hash);
	Node closestPrecedingFinger(1: i32 hash);

	Node getSuccessor();
	Node getPredecessor();
	Node getNode();

	void notify(1: Node n);

	string addFile(1: string filename, 2: string data);
	string putFile(1: string filename, 2: string data);
	string delFile(1: string filename);
	string getFile(1: string filename);
	string getTable(1: i32 nodeID);
}
